
use "KOFGI.dta", clear
 drop if cntry==""
 replace KOFGI=KOFGI/100
  rename KOFGI Index
 
  
   keep if cntry=="AT" | cntry=="BE"  | cntry=="DE" | cntry=="FR"| cntry=="DK"| cntry=="NO"| cntry=="PT" | cntry=="ES" | cntry=="IT" | cntry=="LU" | cntry=="NL" | cntry=="FI" | cntry=="SE" | cntry=="HR" |cntry=="EE" |cntry=="HU" |cntry=="NL" |cntry=="PT"    |cntry=="SE" |cntry=="SK" | cntry=="LV" | cntry=="IL" | cntry=="CZ" | cntry=="GB" |  cntry=="DE" | cntry=="AL" | cntry=="PL" | cntry=="SI" 
  encode cntry,g(Country)
 
 la var Index "Globalisation index (KOFGI)"
 
 
  merge m:n country year using "QOG.dta"
 
 keep if _merge==3
 drop _merge
 
 g yrbrn= year
  g Bologna2=0
replace Bologna2 = 1 if cntry == "AL" & yrbrn >= 2005
replace Bologna2 = 1 if cntry == "AT" & yrbrn >= 2000
replace Bologna2 = 1 if cntry == "BE" & yrbrn >= 2004
replace Bologna2 = 1 if cntry == "HR" & yrbrn >= 2005
replace Bologna2 = 1 if cntry == "CZ" & yrbrn >= 2000
replace Bologna2 = 1 if cntry == "DK" & yrbrn >= 1999
replace Bologna2 = 1 if cntry == "EE" & yrbrn >= 2005
replace Bologna2 = 1 if cntry == "FI" & yrbrn >= 2006
replace Bologna2 = 1 if cntry == "FR" & yrbrn >= 2006
replace Bologna2 = 1 if cntry == "DE" & yrbrn >= 2002
replace Bologna2 = 1 if cntry == "HU" & yrbrn >= 2005
replace Bologna2 = 1 if cntry == "IT" & yrbrn >= 2001
replace Bologna2 = 1 if cntry == "LV" & yrbrn >= 2001
replace Bologna2 = 1 if cntry == "LT" & yrbrn >= 2000
replace Bologna2 = 1 if cntry == "NL" & yrbrn >= 2002
replace Bologna2 = 1 if cntry == "PL" & yrbrn >= 2006
replace Bologna2 = 1 if cntry == "PT" & yrbrn >= 2006
replace Bologna2 = 1 if cntry == "SK" & yrbrn >= 2004
replace Bologna2 = 1 if cntry == "SI" & yrbrn >= 2004
replace Bologna2 = 1 if cntry == "ES" & yrbrn >= 2005
replace Bologna2 = 1 if cntry == "SE" & yrbrn >= 2004
replace Bologna2 = 1 if cntry == "NO" & yrbrn >= 2002
 drop if Bologna2==.

 keep if year>1995 & year<2010
 
  
reg Index Bologna2 i.Country i.year
eststo model1
	quietly: sum Index   
	estadd scalar ymean = r(mean)

reg KOFCuGIdf Bologna2 i.Country i.year
eststo model2
	quietly: sum KOFCuGIdf   
	estadd scalar ymean = r(mean)

reg gle_cgdpc Bologna2 i.Country i.year
eststo model3
	quietly: sum gle_cgdpc   
	estadd scalar ymean = r(mean)

reg gtr_centaxgdp Bologna2 i.Country i.year
eststo model4
	quietly: sum gtr_centaxgdp   
	estadd scalar ymean = r(mean)


noisily esttab model1 model2 model3 model4 using "T11.tex",  nolz  keep(Bologna2 )  booktabs label  b(3) se(3) star(* 0.10 ** 0.05 *** 0.01) mtitles("\shortstack{Economy}" "\shortstack{Culture}" "\shortstack{GPD per capita}" "\shortstack{Tax burden}" )  mgroups("\shortstack{\textbf{\normalsize Globalisation}\vspace*{.1cm}}" "\shortstack{\textbf{\normalsize Macro economy}\vspace*{.1cm}}", pattern(1 0  1 0 ) prefix(\multicolumn{@span}{c}{) suffix(})  span erepeat(\cmidrule(lr){@span}))  stats(ymean r2   N, fmt(3 3  %9.0fc) labels(`"Output mean"' `"\textit{R}-sq"'   `"N. Obs"')) nonotes  noobs nonumbers  noeqlines coeflabels(Bologna2 "Reform")  ///
	 prehead("\begin{table}[htbp]\centering \footnotesize \def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}   \caption{\scshape Additional: exogenous timing \label{tabTiming}}  \begin{center}   \begin{threeparttable} \begin{tabular}{l  cccc} \toprule" )  ///
	 prefoot("[1.5ex] \cmidrule(lr{0.15em}){1-5}" ) ///
	 fragment ///
	 replace ///

 
reg wdi_expedut Bologna2 i.Country i.year
eststo model5
	quietly: sum wdi_expedut   
	estadd scalar ymean = r(mean)
	
reg wdi_unempedua Bologna2 i.Country i.year
eststo model6
	quietly: sum wdi_unempedua   
	estadd scalar ymean = r(mean)
	
reg cpds_ls Bologna2 i.Country i.year
eststo model7
	quietly: sum cpds_ls   
	estadd scalar ymean = r(mean)
	
reg cpds_lr Bologna2 i.Country i.year
eststo model8
	quietly: sum cpds_lr   
	estadd scalar ymean = r(mean)


	 noisily esttab   model5 model6 model7 model8 using "T11.tex", nolz  keep(Bologna2)  booktabs label  b(3) se(3)  star(* 0.10 ** 0.05 *** 0.01)mtitles("\shortstack{Expenditures}" "\shortstack{Unemployment}" "\shortstack{Left seats}" "\shortstack{Right seats}" )  mgroups("\shortstack{\textbf{\normalsize  Higher Education}\vspace*{.1cm}}" "\shortstack{\textbf{\normalsize Politics}\vspace*{.1cm}}", pattern(1 0  1 0 ) prefix(\multicolumn{@span}{c}{) suffix(})  span erepeat(\cmidrule(lr){@span}))  stats(ymean r2   N, fmt(3 3  %9.0fc) labels(`"Output mean"' `"\textit{R}-sq"'   `"N. Obs"')) nonotes  noobs nonumbers  noeqlines coeflabels(Bologna2 "Reform")  ///
	prehead("\midrule \\[-1ex]") ///
	posthead("\hline \\[-1ex]") ///
	prefoot("[1.5ex] \cmidrule(lr{0.15em}){1-5}") /// 
	postfoot("\toprule  \multicolumn{5}{l}{\hspace{1cm}  \small \scshape Common modelling assumptions}\\\\[-1ex] " ///
	"Country FE  &  yes  &  yes  & yes &   yes  \\" ///
    "Year FE  & yes  &   yes &   yes &   yes \\  \toprule \end{tabular}  \begin{tablenotes} \setlength\labelsep{0pt}  \item \scriptsize {\textit{Notes.} Standard errors in parentheses. \sym{*} \(p<0.01\), \sym{**} \(p<0.05\), \sym{***} \(p<0.01\). The globalisation indexes are composite indexes from the KOFGI project. The economic index is based on flows such as  trade, foreign direct investment (FDI), portfolio investment, and income payments to foreign nationals as well as restrictions:  such as tariffs, non-tariff trade barriers, and capital account restrictions. The cultural index is based on  international voice traffic, foreign population (stock), international tourism, and remittances as well as measures of cultural proximity. Macroeconomic data come from the World Bank. GDP per capital is in current dollars. The tax burden is the share of total tax revenues over GDP. Data on education Expenditures is from UNESCO and captures the share of  expenditures in tertiary education as a share of total expenditures on education. Unemployment is the share of individuals aged 24 or more who have a tertiary education diploma. Finally, Left and Right captures  the share of seats in the low house of left and right  parties. }  \end{tablenotes}   \end{threeparttable}   \end{center}  \end{table}" ) ///
	fragment ///
	append  	
	
 
    